﻿namespace FFF.Test.Startup
{
    using System;
    using System.Collections.Generic;
    using System.Diagnostics;
    using System.IO;
    using System.Linq;
    using System.Threading.Tasks;
    using Microsoft.AspNetCore;
    using Microsoft.AspNetCore.Hosting;
    using Microsoft.Extensions.Configuration;
    using Microsoft.Extensions.Logging;
    using FFF.Test.DataAccess.Framework;
    using FFF.Test.DataAccess.Framework.Configuration;

    /// <summary>
    /// 开始类
    /// </summary>
    public static class Program
    {
        /// <summary>
        /// 入口函数
        /// </summary>
        /// <param name="args">传入的函数的值</param>
        public static void Main(string[] args)
        {
            // DiagnosticListener.AllListeners.Subscribe(new CommandListener());
            CreateWebHostBuilder(args).Build().Run();
        }

        /// <summary>
        /// 入口调用starp初始化
        /// </summary>
        /// <param name="args">参数值</param>
        /// <returns>build对象</returns>
        public static IWebHostBuilder CreateWebHostBuilder(string[] args)
        {
            return WebHost.CreateDefaultBuilder(args)
                    .UseStartup<Startup>();
        }
    }
}
